package com.example.demo.niuke;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Stack;

/**
 * @Author: liull
 * @Description: 字符串逆序
 * 输入：I am a student
 * 输出：tneduts a ma I
 * @Date: Created in 15:26 2020/3/24
 * @Modified By:
 */
public class Main22 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s = br.readLine();
        Stack<Character> stack = new Stack();
        for (int i = 0; i < s.length(); i++) {
            stack.push(s.charAt(i));
        }
        while (!stack.empty()) {
            System.out.print(stack.pop());
        }
    }

}
